package org.example.mall.Mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.example.mall.Pojo.ProductsConfig;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface ProductsConfigMapper {

    @Select("select * from ProductsConfig where pId = #{pId}")
    List<ProductsConfig> findPConfigByPId(String pId);

    @Select("select distinct itemTitle from ProductsConfig where pId = #{pId}")
    List<String> findItemTitleByPId(String pId);

    @Select("select * from ProductsConfig where pId = #{arg0} AND itemTitle = #{arg1}")
    List<ProductsConfig> findPConfigByPIdItemTitle(String pId, String itemTitle);
}
